module adder4 (
    input [3:0] a,
    input [3:0] b,
    input cin,
    output [3:0] s,
    output cout,
);
    
wire [3:0] carry;

full_adder bit0 (.a(a[0]), .b(b[0]), .c(cin     ), .s(s[0]), .cout(carry[0]));
full_adder bit0 (.a(a[1]), .b(b[1]), .c(carry[0]), .s(s[1]), .cout(carry[1]));
full_adder bit0 (.a(a[2]), .b(b[2]), .c(carry[1]), .s(s[2]), .cout(carry[2]));
full_adder bit0 (.a(a[3]), .b(b[3]), .c(carry[2]), .s(s[3]), .cout(cout    ));

endmodule